package cn.ittaoli.ajax.controller;

import cn.ittaoli.ajax.model.Nav;
import cn.ittaoli.ajax.service.NavService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by lub_lenovo on 2017/8/10.
 */
@Controller
@RequestMapping("/phone/nav")
public class PhoneNavController {
    @Autowired
    private NavService navService;
    @RequestMapping("/getAll")
    @ResponseBody
    public List<Nav> getAll(){
        List<Nav> navList = navService.getAll();
        return navList;
    }
}
